<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button>插入一行</button>
    <script>
        var bodyEl = document.body;
        var htmlEl = document.documentElement;
        var btn = document.querySelector('button');
        var pEl = document.createElement('div');
        pEl.className = ('box');
        pEl.setAttribute('id', 'biu')
        pEl.innerText = '123';
        btn.onclick = function () {
            bodyEl.appendChild(pEl)
        }


    </script>
</body>

</html>